Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Patterns


GXGetShapePatternPositions

You can use the GXGetShapePatternPositions function to determine the precise locations where QuickDraw GX draws the shapes that pattern another shape.

long GXGetShapePatternPositions(gxShape source, 
                                gxPoint positions[]);
source
A reference to the shape whose pattern positions you want to find.
positions
An array of pattern positions. On return, this array contains points that indicate the position of the pattern shapes that pattern the source shape.
function result
The number of pattern positions returned in the positions parameter.
DESCRIPTION
The GXGetShapePatternPositions function returns in the positions parameter the locations of the pattern shapes as drawn for the source shape.

The function result is the number of pattern positions returned--the number of pattern shapes drawn for the source shape.

If you pass nil for the positions parameter, the GXGetShapePatternPositions function still returns as the function result the number of pattern shapes but it does not return the positions of the pattern shapes.

This function returns 0 if the source shape has no pattern.

ERRORS, WARNINGS, AND NOTICES
Errors
out_of_memory
shape_is_nil
SEE ALSO
For a discussion of patterns, see "Patterns" on page 3-31.

For an example using this function, see "Determining Pattern Positions" on page 3-88.

For a discussion of the gxPatternRecord structure and a description of what types of shapes you can use as pattern shapes, see "The Pattern Structure" on page 3-106.

To retrieve pattern information from a style object, use the GXGetStylePattern function, which is described on page 3-142. To specify pattern information for a style object, use the GXSetStylePattern function, which is described on page 3-144.

To retrieve pattern information from a style object associated with a particular shape, use the GXGetShapePattern function, which is described on page 3-145. To specify pattern information for a style object associated with a particular shape, use the GXSetShapePattern function, which is described on page 3-146.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help